//
//  CABrandsObject.m
//  qiche
//
//  Created by liu haley on 12-12-10.
//  Copyright (c) 2012年 iCar. All rights reserved.
//

#import "CABrandsObject.h"

@implementation CAManufacturerObject
@synthesize Id,manufacturerName;
-(void)dealloc
{
    self.Id = nil;
    self.manufacturerName = nil;
    [super dealloc];
}

-(id)init
{
    self = [super init];
    if (self) {
        self.Id = nil;
        self.manufacturerName = nil;
    }
    return self;
}

-(id)initWithDict:(NSDictionary*)dict
{
    if (!dict) {
        return nil;
    }
    self = [super init];
    if (self) {
        if (![[dict objectForKey:@"id"]isKindOfClass: [NSNull class]]) {
            self.Id = [dict objectForKey:@"id"];
        } 
        if (![[dict objectForKey:@"nanufacturerName"]isKindOfClass: [NSNull class]]) {
            self.manufacturerName = [dict objectForKey:@"nanufacturerName"];
        }
    }
    return self;
}
@end

@implementation CABrandsObject
@synthesize Id,brandName,manufacturer;
-(void)dealloc
{
    self.Id = nil;
    self.brandName = nil;
    self.manufacturer = nil;
    [super dealloc];
}

-(id)init
{
    self = [super init];
    if (self) {
        self.Id = nil;
        self.brandName = nil;
        self.manufacturer = nil;
    }
    return self;
}

-(id)initWithDict:(NSDictionary*)dict
{
    self = [super init];
    if (self) {
        if (![[dict objectForKey:@"id"]isKindOfClass: [NSNull class]]) {
            self.Id = [dict objectForKey:@"id"];
        } 
        if (![[dict objectForKey:@"brandName"]isKindOfClass: [NSNull class]]) {
            self.brandName = [dict objectForKey:@"brandName"];
        }
        if (![[dict objectForKey:@"manufacturer"]isKindOfClass: [NSNull class]]) {
            if ([[dict objectForKey:@"manufacturer"] isKindOfClass:[NSDictionary class]]) {
                CAManufacturerObject *obj = [[CAManufacturerObject alloc] initWithDict:[dict objectForKey:@"manufacturer"]];
                self.manufacturer = obj;
                [obj release];
            }
        }
        
    }
    return self;
}
@end

@implementation CACarSeriesObject
@synthesize Id,seriesName;
-(void)dealloc
{
    self.Id = nil;
    self.seriesName = nil;
    [super dealloc];
}

-(id)init
{
    self = [super init];
    if (self) {
        self.Id = nil;
        self.seriesName = nil;
    }
    return self;
}

-(id)initWithDict:(NSDictionary*)dict
{
    if (!dict) {
        return nil;
    }
    self = [super init];
    if (self) {
        if (![[dict objectForKey:@"id"]isKindOfClass: [NSNull class]]) {
            self.Id = [dict objectForKey:@"id"];
        }
        if (![[dict objectForKey:@"seriesName"]isKindOfClass: [NSNull class]]) {
            self.seriesName = [dict objectForKey:@"seriesName"];
        }
    }
    return self;
}
@end

@implementation CACarTypeObject
@synthesize Id,typeName;
-(void)dealloc
{
    self.Id = nil;
    self.typeName = nil;
    [super dealloc];
}

-(id)init
{
    self = [super init];
    if (self) {
        self.Id = nil;
        self.typeName = nil;
    }
    return self;
}

-(id)initWithDict:(NSDictionary*)dict
{
    if (!dict) {
        return nil;
    }
    self = [super init];
    if (self) {
        if (![[dict objectForKey:@"id"]isKindOfClass: [NSNull class]]) {
            self.Id = [dict objectForKey:@"id"];
        }
        if (![[dict objectForKey:@"typeName"]isKindOfClass: [NSNull class]]) {
            self.typeName = [dict objectForKey:@"typeName"];
        }
    }
    return self;
}
@end
